package com.qfedu.food.controller;

import com.qfedu.food.dto.PageDto;
import com.qfedu.food.service.intf.ThomeLifeService;
import com.qfedu.food.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:生命因你而火热
 * @date: 2021/1/11 20:59
 */
@RequestMapping
@RestController("api/thomeLife/")
@Api(tags = "实现thomeLife各种操作")
public class ThomeLifeController {

    @Autowired
    private ThomeLifeService thomeLifeService;

    @ApiOperation(value = "实现全部查询",notes = "实现全部查询")
    @GetMapping("all.do")
    public R selectAllThomeLife(){
        return thomeLifeService.queryAll();
    }
    @ApiOperation(value = "实现分页带参查询",notes = "实现分页带参查询")
    //@GetMapping(value = "queryall.do",produces = "application/json;charset=UTF-8")//分页查询，带参
    @GetMapping( "queryall.do")
    public R all(@RequestBody PageDto dto){
        return thomeLifeService.selectByPage(dto);
    }

}